package o;

import com.huawei.appmarket.service.predownload.jobservice.WlanPeriodicJobService;
import java.security.SecureRandom;
import java.util.Calendar;

public class daj {
    private static daj ॱ;
    private long ʻ = WlanPeriodicJobService.DEFAULT_JOB_PERIODIC;
    private int ʼ = 72;
    private boolean ˊ = true;
    private long ˋ = 6900000;
    private long ˎ = 30000;
    private long ˏ = -1;
    private long ॱॱ = 21594000;
    private int ᐝ = 5;

    public static synchronized daj ˎ() {
        daj o_daj;
        synchronized (daj.class) {
            if (ॱ == null) {
                ॱ = new daj();
            }
            o_daj = ॱ;
        }
        return o_daj;
    }

    private daj() {
        long ॱ = euf.ˎ().ॱ("repeating_task_cycle_time", -1);
        if (ॱ > 0) {
            this.ˏ = ॱ;
        }
        int ॱ2 = euf.ˎ().ॱ("max_update_notify_size", -1);
        if (ॱ2 > 0) {
            this.ᐝ = ॱ2;
        }
        ॱ = euf.ˎ().ॱ("min_update_notify_interval_time", -1);
        if (ॱ > 0) {
            this.ʻ = ॱ;
        }
        ॱ2 = euf.ˎ().ॱ("update_check_mult_times", -1);
        if (ॱ2 > 0) {
            this.ॱॱ = (((long) ॱ2) * ˊ()) - 6000;
        }
    }

    public void ˏ(long j) {
        if (j > 0) {
            this.ʻ = j;
            euf.ˎ().ˎ("min_update_notify_interval_time", j);
        }
    }

    public void ॱ(int i) {
        if (i > 0) {
            this.ᐝ = i;
            euf.ˎ().ˊ("max_update_notify_size", i);
        }
    }

    public long ˊ() {
        long j;
        if (!ˋ() || this.ˏ <= 0) {
            j = this.ˋ;
        } else {
            j = this.ˏ;
        }
        return (j - 510000) + ((long) ʼ());
    }

    public void ॱ(long j) {
        if (j > 0) {
            this.ˏ = j;
            euf.ˎ().ˎ("repeating_task_cycle_time", j);
        }
    }

    public boolean ˋ() {
        return this.ˊ;
    }

    public void ˋ(int i) {
        this.ʼ = i;
    }

    public long ˏ() {
        return this.ॱॱ;
    }

    public void ˊ(int i) {
        this.ॱॱ = (ˊ() * ((long) i)) - 6000;
        euf.ˎ().ˊ("update_check_mult_times", i);
    }

    public boolean ॱ() {
        Calendar instance = Calendar.getInstance();
        int i = instance.get(11);
        int i2 = instance.get(12);
        if ((5 != i || i2 < 45) && (7 != i || i2 > 15)) {
            return false;
        }
        return true;
    }

    private int ʼ() {
        return new SecureRandom().nextInt(1020000);
    }
}
